import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner num = new Scanner(System.in);
        while(num.hasNextInt()){
            int m = num.nextInt();
            int n = num.nextInt();
            int x = 0;
            for (int i = m; i <= n; i++) {
                int a = i % 10;
                int b = i / 10 % 10;
                int c = i /100;
                if(a*a*a + b*b*b + c*c*c == i){
                    System.out.print(i + " ");
                    x = 1;
                }else{
                    if(i == n && x == 0){
                        System.out.println("no");
                    }
                }
            }
        }
    }
}
